package cn.sx.entity;

import cn.sx.util.SystemStringUtil;
import org.springframework.stereotype.Component;

/*
 *@program:sx_emal_ssm
 *@author: sx
 *@desc: 用户实体类
 *@Time: 2020/9/9  10:05
 */
@Component
public class User {
    private int id;//id
    private String username;//用户名
    private String password;//密码
    private String name ;//收货人
    private String phone ;//收货人电话
    private String address;//收货地址

    public User() {
    }

    public User(int id, String username, String password, String name, String phone, String address) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.name = name;
        this.phone = phone;
        this.address = address;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", name='" + name + '\'' +
                ", phone='" + phone + '\'' +
                ", address='" + address + '\'' +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = SystemStringUtil.strNotNullTrim(username);
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = SystemStringUtil.strNotNullTrim(password);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = SystemStringUtil.strNotNullTrim(name);
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = SystemStringUtil.strNotNullTrim(phone);
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = SystemStringUtil.strNotNullTrim(address);
    }
}
